﻿using System;

using System.Collections.Generic;
using System.Text;

namespace Silvermoon.Animations
{
    public class BoolAnimation : Animation<bool>
    {
        public BoolAnimation()
            : base()
        { }

        public BoolAnimation(int duration, bool startValue, bool endValue, int startDelay)
            : this()
        {
            From = startValue;
            To = endValue;
            Duration = duration;
            StartDelay = startDelay;
        }

        protected override bool CalculateValue(float value)
        {
            return value == 1f ? To : From;
        }
    }
}
